package com.zb.Service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zb.Service.SheduleService;
import com.zb.entity.Shedule;
import com.zb.mapper.SheduleMapper;
@Component("SheduleService")
public class SheduleServiceImpl implements SheduleService{
	@Autowired
	private SheduleMapper shemap;
	
	public List<Shedule> getSheduleSelf(int uid) {
		return shemap.getSheduleSelf(uid);
	}

	public Shedule getSheduleById(int id) {
		return shemap.getSheduleById(id);
	}

	public int addShedule(Shedule shedule) {
		return shemap.addShedule(shedule);
	}

	public int updateShedule(Shedule shedule) {
		return shemap.updateShedule(shedule);
	}

	public int deleteShedule(int id) {
		return shemap.deleteShedule(id);
	}

	public List<Shedule> getSheduleByDept(int did, int uid) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("did", did);
		map.put("uid", uid);
		return shemap.getSheduleByDept(map);
	}

	public Shedule getShedule() {
		return shemap.getShedule();
	}

}